package hcmus.fit.master.sevensea.background;

import hcmus.fit.master.sevensea.core.AbstractLayer;
import hcmus.fit.master.sevensea.core.Constant;
import hcmus.fit.master.sevensea.util.Size;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;

public class BorderLayer extends AbstractLayer {

    public BorderLayer(Size viewSize) {
        super(viewSize);
    }

    @Override
    public void draw(Canvas canvas) {
        Paint p = new Paint();
        p.setStyle(Paint.Style.STROKE);
        p.setColor(Color.DKGRAY);
        p.setAlpha(100);
        int nbOfCol = 16;
        int nbOfRow = 16;
        for (int i = 1; i < nbOfCol; i++) {
            canvas.drawLine(i * Constant.CellWidthOrg, 0, i * Constant.CellWidthOrg,
                    viewSize.getHeight(), p);
        }
        for (int i = 1; i < nbOfRow; i++) {
            canvas.drawLine(0, i * Constant.CellHeightOrg, viewSize.getWidth(), i
                    * Constant.CellHeightOrg, p);
        }
    }

    @Override
    public boolean update() {
        return true;
    }

    @Override
    public Bitmap getSourceFromResource() {
        return null;
    }

}
